package com.dawn.module.hospital.enums;

import cn.hutool.core.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @description:
 * @author: cnsu-cmh
 * @time: 2024/4/9 12:16
 */
@Getter
@AllArgsConstructor
public enum MedicalStatusEnum {


    STATUS_APPLY(0,"待审核"),
    STATUS_EXAMINE_OK(1,"审核通过"),
    STATUS_EXAMINE_NO(2,"审核不通过"),
    STATUS_ORDER_PAY(3,"待支付"),
    STATUS_PAY_SUCCESS(4,"已支付"),
    STATUS_REFUND(5,"已退款"),
    STATUS_TAKE(6,"待取件"),
    STATUS_SEND(7,"已发货"),
    STATUS_END(8,"已完成"),
    ;



    private final Integer code;

    private final String name;


    public static MedicalStatusEnum valueOfType(String name) {
        return ArrayUtil.firstMatch(o -> o.getName().equals(name), values());
    }
}
